<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ include file="/user/common.jsp"%>
<%@ page import="com.bci.pwtz.common.util.SpringUtil" %>
<%@ page import="com.bci.pwtz.service.ConfigService" %>
<%@ page import="com.bci.pwtz.service.DyxlService" %>
<%@ page import="com.bci.pwtz.mysql.model.Dyxl" %>
<%
Long companyId=null;
if(user!=null){
    companyId=user.getLastCompanyId();
}
ConfigService configService=(ConfigService)SpringUtil.getBean("configService");
String picpath=configService.getConfigByKey("DevicePICPath");
String deviceid=request.getParameter("deviceid");
//deviceid="3498a3b2-e703-410c-aa87-20389f0872e3";
DyxlService service=(DyxlService)SpringUtil.getBean("dyxlService");
Dyxl device=service.load(deviceid);
int byqtype=0;
String transformercode="";
String byqname="";
String dbyqtype="";
if(device!=null){
    transformercode=device.getTransformercode();
    byqtype=device.getDevicetype();
    if(byqtype==1){
        byqname="配电变压器";
        dbyqtype="pdbyq";
    }else{
        byqname="柱上变压器";
        dbyqtype="zsbyq";
    }
}
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>配网数据-低压交叉跨越</title>
<link href="<%=basePath %>user/css/style.css" rel="stylesheet" type="text/css" />
<link href="<%=basePath %>user/css/llcss.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="<%=basePath %>js/jquery/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=basePath %>js/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/hd_ll.js"></script>
<script type="text/javascript" src="<%=basePath %>user/js/common.js"></script>
<script type="text/javascript" src="<%=basePath %>js/ajaxfileupload.js"></script>
<script type="text/javascript" src="<%=basePath %>js/toolutils.js"></script>
<script type="text/javascript">
var companyId=<%=companyId%>;
var picpath='<%=picpath%>';
var deviceid='<%=deviceid%>';
var byqtype=<%=byqtype%>;
var transformercode='<%=transformercode%>';
var lineCode = '<%=deviceid%>';
</script>
<script type="text/javascript" src="<%=basePath %>user/d/js/dyjckyadd.js"></script>
</head>
<body bgcolor="white">
	<%@ include file="/user/head.jsp"%>
	<!-- main_begin -->
	<div class="pwsj_cont_box">
	<%@ include file="/user/left.jsp"%>
	<!-- 右侧内容_begin -->
	<form id="form">
		<div class="pwsj_cont_right_box" scroll="no">
		<!-- 柱上变压器_begin -->
		<div class="pwsj_right_byq" scroll="no">
			<div class="pwsj_right_byq_position" style="margin-bottom:3px;">
				<a href="<%=basePath %>user/m/index.jsp" class="position">配网数据</a>&gt;
				<a href="<%=basePath %>user/d/<%=dbyqtype %>list.jsp" class="position"><%=byqname %></a>&gt;
				<a href="<%=basePath %>user/d/dyxllist.jsp?deviceid=<%=transformercode %>&devicetype=<%=byqtype %>" class="position">低压线路</a>&gt;
				<a class="position">添加低压交叉跨越</a>
				<a class="right"  href="<%=basePath%>user/d/dyxllist.jsp?deviceid=<%=device.getDeviceid()%>&t=<%=System.currentTimeMillis() %>">返回</a><a class="right"  onclick="add()">保存</a>
			</div>
			<!-- 运行参数_begin -->
			<div class="argument_box">
				<!-- 参数标题-begin -->
				<div class="argument_title">
					<p class="title">运行参数</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 参数标题-end -->
				<!-- 参数内容_begin -->
				<div class="argument_cont_box">
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>设备名称：</span><input class="text" type="text" id="devicename" name="devicename" maxlength="100"/><em style="color:red;"> *</em></li>
						<li class="argument_cont_li"><span>运行编号：</span><input class="text" type="text" id="devicenumber" name="devicenumber"/></li>
						<li class="argument_cont_li"><span>所属线路名称：</span><input class="text" type="hidden" id="linecode" name="linecode" value="<%=device.getDeviceid()%>"/><input class="text" type="text" readonly="readonly" id="linename" value="<%=device.getDevicename()%>"/></li>						
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>起始杆塔：</span>
							<input class="text" type="hidden" id="starttowername"/>
							<select class="select_down" id="starttowercode" name="starttowercode" onchange="checkDeviceName();">
								<option value="0">--请选择--</option>
							</select>
						</li>	
						<li class="argument_cont_li">
							<span>终止杆塔：</span>
							<input class="text" type="hidden" id="endtowername"/>
							<select class="select_down" id="endtowercode" name="endtowercode" onchange="checkDeviceName();">
								<option value="0">--请选择--</option>
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li"><span>所属地市：</span><input class="text" type="text" name="localcity" value="<%=device.getLocalcity()%>"/><!-- <em style="color:red;"> *</em> --></li>					
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>运维单位：</span><input class="text" type="text" name="operationunit" value="<%=device.getOperationunit()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>维护班组：</span><input class="text" type="text" name="maintenanceteam" value="<%=device.getMaintenanceteam()%>"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li"><span>电压等级：</span><select class="select_down" name="voltagelevel" id="voltagelevel">
							<option value="380v" selected="selected">380v</option>
							<option value="220v">220v</option>
						</select>
						<!-- <em style="color:red;"> *</em> -->
						</li>							
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li">
							<span>是否多回路跨越：</span>
							<select class="select_down" name="ismultipleloop">
								<option value="否" selected="selected">否</option>
								<option value="是">是</option>
							</select>
						</li>
						<li class="argument_cont_li"><span>交跨距离：</span><input class="text" type="text" name="crossdistance" value="0.00" /><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li">
							<span>被跨物分类：</span>
							<select class="select_down" name="crossclassification">  
								<option value ="跨越建筑物" selected="selected">跨越建筑物</option>  
								<option value ="跨越河流">跨越河流</option>
								<option value="跨越高压线">跨越高压线</option>
								<option value="跨越低压线">跨越低压线</option>
								<option value="跨越公路">跨越公路</option>
								<option value="跨越铁路">跨越铁路</option>
								<option value="跨越通信线路">跨越通信线路</option>			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>	
						<div class="clear"></div>
					</ul>
					<ul class="argument_cont_ul">
						<li class="argument_cont_li"><span>被跨物名称：</span><input type="text" class="text" name="crossname" id="crossname"/><!-- <em style="color:red;"> *</em> --></li>
						<li class="argument_cont_li">
							<span>交跨方位：</span>
							<select class="select_down" name="crossrange">  
								<option value ="一般" selected="selected">上跨</option>  
								<option value ="重要">下跨</option>			
							</select>
							<!-- <em style="color:red;"> *</em> -->
						</li>
						<li class="argument_cont_li">
							<span>运行状态：</span>
							<select class="select_down" name="operationstate">  
								<option value ="正常" selected="selected">正常</option>  
								<option value ="异常">异常</option>
								<option value ="故障">故障</option>
								<option value ="缺陷">缺陷</option> 			
							</select>
						</li>							
						<div class="clear"></div>
					</ul>
				</div>
				<!-- 参数内容_end -->
			</div>
			<!-- 运行参数_end -->

			<!-- 扩展属性_begin -->
			<div class="argument_box">
				<!-- 设备图片_begin -->
				<div class="kzsx_big_img" style="display:none;">
					<img src="" onload = "autoSize(this,400)" alt="" />			
				</div>
				<!-- <img class="kzsx_big_img_close" src="images/add_facility_close.png" alt="" /> -->
				<!-- 设备图片_end -->

				<!-- 标题-begin -->
				<div class="argument_title">
					<p class="title">扩展属性</p>
					<a  class="show"></a>
					<div class="clear"></div>
				</div>				
				<!-- 标题-end -->
				<!-- 扩展属性内容_begin -->
				<div class="argument_cont_box" style="border-bottom:1px solid #dedede;">
					<!-- 扩展属性左侧_begin -->
					<div class="kzsx_cont_leftbox">
						<div class="add_pic">
							照片信息:
							<select class="select_down" style="width:80px; height:25px; margin-right:10px;" id="pictype">  
								<option style="text-indent:5px;" selected="selected" value="">--请选择--</option>
							</select>
							<!-- <input type="text" id="kzsx_add_pic_text" class="text" placeholder="请选择图片" />
							<input type="button" class="add_pic_btn" value="浏览" onclick="document.getElementById('picfile').click();" /> -->
							<input type="file" id="picfile" name="picfile"/>
							<input type="button" value="上传" onclick="return uploadPic()"/>
						</div>
						<!-- 图片动画_begin -->
						<div class="img_flash_box">
							<div class="left_btn"><img src="<%=basePath %>user/images/btn_left.png" /></div>
							<!-- 图片展示_begin -->
							<div class="center">
								<div class="inner_box" id="inner_box">
									<%-- <div class="img_p">
										<div class="top_div">
											<img class="small_pic" onload="autoSize(this,98)" src="<%=basePath %>user/images/img_device/shebei_1.jpg" alt="" />
										</div>	
										<p>设备文字1</p>
									</div> --%>
									<div id="clear" class="clear"></div>
								</div>
							</div>
							<!-- 图片展示_begin -->
							<div class="right_btn"><img src="<%=basePath %>user/images/btn_right.png"/></div>
							<div class="clear"></div><!-- 清除左右浮动 -->
						</div>
						<!-- 图片动画_end -->
						<!-- <div class="ts">温馨提示：单击缩略图即可放大，再次单击关闭放映。</div> -->
					</div>
					<!-- 扩展属性左侧_end -->

					<!-- 扩展属性右侧_begin -->
					<div class="kzsx_cont_rightbox">
						<div class="right_title">
							设备空间信息：
							<p><span>经度：</span><input class="text" type="text" name="longitude"/></p>
							<p><span>纬度：</span><input class="text" type="text" name="latitude"/></p>
							<p><span>高度：</span><input class="text" type="text" name="altitude"/></p>
						</div>
					</div>
					<!-- 扩展属性右侧_end -->
					<div class="clear"></div>
				</div>
				<!-- 扩展属性内容_end -->
			</div>
			<!-- 扩展属性_end -->
		</div>	
		<!-- 柱上变压器_end -->		
	</div>
	</form>
	<!-- 右侧内容_end -->
	<div class="clear"></div><!-- 清除左右浮动 -->
	</div>
	<!-- main_end -->
	<%@ include file="/user/foot.jsp"%>
</body>
</html>